import 'package:flutter/material.dart';
import 'package:flutter_09_game/config/app_color.dart';
import 'package:flutter_09_game/widgets/crypto_tag_selector.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

class WidgetBetRecordTopCrypto extends StatelessWidget {
  const WidgetBetRecordTopCrypto(
      {super.key,
      required this.selectorTagRx,
      required this.options,
      this.backgroundColor});

  final RxString selectorTagRx;
  final List<String> options;
  final Color? backgroundColor;

  @override
  Widget build(BuildContext context) {
    return Obx(() {
      return Container(
        color: backgroundColor ?? AppColor.navBgColor,
        padding: EdgeInsets.all(16.w).copyWith(bottom: 0),
        child: CryptoTagSelector(
          options: options,
          selectedValue: selectorTagRx.value,
          onChanged: (value) {
            selectorTagRx.value = value;
          },
        ),
      );
    });
  }
}
